#pragma once
#include <Vector2.h>
#include <Timer.hpp>
// #include <IAnimation.h>
#include <IRotation.h>
#include <IVisible.h>
class IAnimation;
class Entity;
class Bullet;
enum PartAction
{
    NONE = 0,
    MOVE = 2,
    ATTACK = 4,
    DEFENCE = 8,
    HARVEST = 16,
    GOLD = 32,
};
enum class ResourceType
{
    GOLD = 32,
    IRON = 64
};
enum class PartAttackType
{
    NONE = 0,
    INSTANT,
    BULLET
};

class Part : public IRotation, public IVisible
{
public:
    IAnimation *animation;
    real attack;
    real range;
    real allowAttackFacingDifference;
    real followRange;
    Timer attackTimer;
    real attackCD;
    int gold = 0;
    Entity *follow = nullptr;
    PartAttackType attackType;
    Bullet* bullet = nullptr;
    int actions = (int)PartAction::NONE;
    Vector2 bulletOffset;
    std::string attackEffect;
    std::string targetEffect;
public:
    Part(/* args */) = default;
    ~Part();
};